{#include main}
{#title}Quarkus REST Score Console{/title}
{#body}
  {#for endpoint in info:endpointScores.endpoints}
    <div class="row">
     <div class="col">
      <code>{endpoint.httpMethod} {endpoint.fullPath}</code>
     </div>
     <div class="col-1">
      <span class="badge badge-{#if endpoint.score < 50}danger{#else if endpoint.score < 100}warning{#else}success{/if}">{endpoint.score}/100</span>
     </div>
    </div>
    {#if !endpoint.produces.isEmpty()}
     <div class="row">
      <div class="col-1"></div>
      <div class="col-1">
       Produces
      </div>
      <div class="col">
       {endpoint.produces}
      </div>
     </div>
    {/if}
    {#if !endpoint.consumes.isEmpty()}
     <div class="row">
      <div class="col-1"></div>
      <div class="col-1">
       Consumes
      </div>
      <div class="col">
       {endpoint.produces}
      </div>
     </div>
    {/if}
    {#for diagnosticEntry in endpoint.diagnostics.entrySet()}
     <div class="row">
      <div class="col-1"></div>
      <div class="col-1">
       {diagnosticEntry.key}
      </div>
     </div>
     {#for diagnostic in diagnosticEntry.value}
      <div class="row">
       <div class="col-1"></div>
       <div class="col-1"></div>
       <div class="col">
        {diagnostic.message}
       </div>
       <div class="col-1">
        <span class="badge badge-{#if diagnostic.score < 50}danger{#else if diagnostic.score < 100}warning{#else}success{/if}">{diagnostic.score}/100</span>
       </div>
      </div>
     {/for}
    {/for}
  {/for}
{/body}
{/include}
